<template>
  <div class="header">
    <!-- 用slot插槽来接收 从组件内容区传入的标签 -->
    <span><slot name="left"></slot></span>
    <span>{{title}}</span>
    <span><slot name="right"></slot></span>
  </div>
</template>

<script>
export default {
  props:['title']
}
</script>

<style scoped>
.header{
  display: flex;
  justify-content: space-between;
  line-height: 50px;
  padding: 0 20px;
  background-color: #f5f5f5;
}
</style>
